# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-ovos-vad-plugin-webrtcvad
pkgver=0.0.1
pkgrel=1
pkgdesc="ovos plugin for voice activity detection using webrtcvad"
url="https://github.com/OpenVoiceOS/ovos-vad-plugin-webrtcvad"
# 32-bit arches blocked by py3-webrtcvad
# s390x, ppc64le and riscv64 blocked by py3-webrtcvad
# loongarch64: blocked by py3-ovos-plugin-manager
arch="noarch !x86 !armhf !armv7 !s390x !ppc64le !riscv64 !loongarch64"
license="Apache-2.0"
depends="
	py3-webrtcvad
	py3-ovos-plugin-manager
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenVoiceOS/ovos-vad-plugin-webrtcvad/archive/refs/tags/V$pkgver.tar.gz"
options="!check" # No tests
builddir="$srcdir/ovos-vad-plugin-webrtcvad-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
516d565498d65fdb1dec1cc22be242fd401943164e85dc3c01861348640a6aa40a0175d7e6bc3a913750a91ef9ae804fe71e185a9efd2c25112e9ee698150f1e  py3-ovos-vad-plugin-webrtcvad-0.0.1.tar.gz
"
